package com.song.server.utils;

import com.song.server.entity.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

// 管理员工具类 - 获取当前登录用户
public class AdminUtils {

    public static Admin getCurrentAdmin() {
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
